package com.superman.supermarket.client.composite.orderlist.opt;

import java.util.Map;

import com.google.inject.Inject;
import com.superman.supermarket.client.constant.OrderListOperationConstants;

/**
 * 订单列表中的操作按钮
 * 
 * @author superman
 * @version 2017年4月24日上午10:29:48
 */
public class OpButtonOperatorFactory {

	@Inject
	OPButtonOperator dispatcher;

	/**
	 * 点击操作
	 * 
	 * @author superman
	 * @version 2018年8月12日 下午8:33:09
	 * @param obj
	 * @param op
	 */
	public void option(Map<String, Object> obj, int op) {
		switch (op) {
			case OrderListOperationConstants.Pay:
				dispatcher.pay(obj);
				break;
			case OrderListOperationConstants.Cancel:
				dispatcher.cancel(obj);
				break;
			case OrderListOperationConstants.Confirm:
				dispatcher.confirm(obj);
				break;
			case OrderListOperationConstants.Comment:
				dispatcher.comment(obj);
				break;
			case OrderListOperationConstants.LogisticsState:
				dispatcher.logisticsState(obj);
				break;
			case OrderListOperationConstants.Refund:
				dispatcher.refund(obj);
				break;
			case OrderListOperationConstants.AfterSales:
				dispatcher.afterSales(obj);
				break;
			case OrderListOperationConstants.Refunding:
				dispatcher.refunding(obj);
				break;
			case OrderListOperationConstants.ReturnGoods:
				dispatcher.returnGoods(obj);
				break;
			case OrderListOperationConstants.CloseRefundApplication:
				dispatcher.closeRefundApplication(obj);
				break;
			case OrderListOperationConstants.UpdateRefundApplication:
				dispatcher.updateRefundApplication(obj);
				break;
			case OrderListOperationConstants.RefundSuccess:
				dispatcher.refundSuccess(obj);
				break;
			case OrderListOperationConstants.RefundRefused:
				dispatcher.refundRefused(obj);
				break;
			case OrderListOperationConstants.TicketList:
				dispatcher.ticketList(obj);
				break;
			case OrderListOperationConstants.DeleteOrder:
				dispatcher.deleteOrder(obj);
				break;

		}
	}

}
